 
import request from '@/utils/request'
 
export default {
 deletecourse(id){

  return request({
    url:`/eduservice/course/delete/${id}`,
    method:'delete'
  })
 },

  updateCourseInfo(courseInfo){
    return request({
 
      url: `/eduservice/course/update/`,
 
      method: 'post',
 
      data: courseInfo
 
    })

  },
  saveCourseInfo(courseInfo) {

 
    return request({
 
      url: `/eduservice/course/saveCourse/`,
 
      method: 'post',
 
      data: courseInfo
 
    })
 
  },
  
getList() {
 
      return request({
   
          url: `/eduservice/teacher/findAll`,
 
          method: 'get'
 
      })
 
  },

  getCourseInfoById(id){
 
    return request({
   
      url: `/eduservice/course/getCourseById/${id}`,

      method: 'get'

  })

  },

 
getPageList(page, limit, searchObj) {
 
  return request({
 
    url: `/eduservice/course/${page}/${limit}`,
 
    method: 'get',
 
    params: searchObj
 
  })
 
},


getCoursePublishInfoById(id) {
 
    return request({
   
      url: `/eduservice/course/coursePublishInfo/${id}`,
 
      method: 'get'
 
    })
  
  },
 
   
  publishCourse(id) {
  
    return request({
 
      url: `/eduservice/course/publishCourse/${id}`,
   
      method: 'put'
  
    })
 
  }
}